home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Action / ActionLocus.h < prev   
Text File  |  2000-06-23  |  788b  |  46 lines

  1. // ActionLocus.h
  2.  
  3. #ifndef ActionLocus_h
  4. #define ActionLocus_h
  5.  
  6. #ifndef Undoing_h
  7. #include "Undoing.h"
  8. #endif
  9. #ifndef CommandHandler_h
  10. #include "CommandHandler.h"
  11. #endif
  12. #ifndef Str_h
  13. #include "Str.h"
  14. #endif
  15. #ifndef Action_h
  16. #include "Action.h"
  17. #endif
  18.  
  19. class ActionLocus: public CommandHandler< Undoing >
  20.   {
  21.     private:
  22.         Action *action;
  23.         String255 name;
  24.         bool done;
  25.         
  26.     public:
  27.         ActionLocus( Focus& );
  28.     
  29.         virtual bool ActionIsDone() const        { return done; }
  30.         virtual ConstData ActionName() const    { return name; }
  31.         
  32.         virtual bool CanUndo() const;
  33.         virtual void Undo();
  34.         
  35.         virtual bool CanRedo() const;
  36.         virtual void Redo();
  37.  
  38.         void SetAction( bool done,
  39.                              ConstStr255Param name = "\p",
  40.                              Action& action = Action::Irreversible() );
  41.  
  42.         void CommitAction();
  43.   };
  44.  
  45. #endif
  46.